ml$abs_goal <- as.numeric(grepl("4",ml$goals_q6_2,T))
ml$abs_goal[is.na(ml$goals_q6_2)] <- NA

# Prescriptive norms ------------------------------------------------------

# ABS

mlcb$repeat_absense_q10_7
ml$repeat_absence <- NA
ml$repeat_absence[ml$repeat_absense_q10_7 == 2] <- 0
ml$repeat_absence[ml$repeat_absense_q10_7 == 1] <- 1

# Efficacy ----------------------------------------------------------------

# ABS

mlcb$change_abs_q10_9
ml$abs_efficacy <- NA
ml$abs_efficacy[ml$change_abs_q10_9 == 1] <- 0
ml$abs_efficacy[ml$change_abs_q10_9 == 2] <- 1

# Discussion --------------------------------------------------------------

ml$convers_q3_3
mlcb$convers_q3_3

ml$abs_discussion <- as.numeric(
	grepl(
		pattern = "7",
		x = ml$convers_q3_3,
		ignore.case = TRUE
	))
ml$abs_discussion[is.na(ml$convers_q3_3)] <- NA  

# Conative Descriptive Norms ---------------------------------------------------------

#ABS
mlcb$village_action_q10_8
ml$village_action <- NA
ml$village_action[ml$village_action_q10_8 == 1] <- 0 
ml$village_action[ml$village_action_q10_8 == 2] <- 1 

# Spending Priorities -----------------------------------------------------
mlcb$gov_spend_q11_3
ml$more_health_centers <- NA
ml$more_health_centers <- (ml$gov_spend_q11_3 == 2)*1 
ml$more_schools <- NA
ml$more_schools <- (ml$gov_spend_q11_3 == 3)*1 


# Violence against women --------------------------------------------------

mlcb$intervene_q8_9
ml$should_intervene <- NA
ml$should_intervene[ml$intervene_q8_9 == 2] <- 0
ml$should_intervene[ml$intervene_q8_9 == 1] <- 1


ml$convers_q3_3
mlcb$convers_q3_3

ml$IPV_discussion <- as.numeric(
	grepl(
		pattern = "1",
		x = ml$convers_q3_3,
		ignore.case = TRUE
	))
ml$IPV_discussion[is.na(ml$convers_q3_3)] <- NA


# Abortion ----------------------------------------------------------------

mlcb$adult_complic_q12_9
ml$should_help <- NA
ml$should_help[ml$adult_complic_q12_9 == 2] <- 0
ml$should_help[ml$adult_complic_q12_9 == 1] <- 1

ml$abo_discussion <- as.numeric(
	grepl(
		pattern = "3",
		x = ml$convers_q3_3,
		ignore.case = TRUE
	))
ml$abo_discussion[is.na(ml$convers_q3_3)] <- NA

mlcb$involved_q12_1
ml$involved <- NA
ml$involved[ml$involved_q12_1 == 2] <- 1
ml$involved[ml$involved_q12_1 == 1] <- 0
